<!--搜索与重置-->
<template>
  <div class="head-container">
  <el-form ref='search' :inline="true" @submit.native.prevent :model="queryParam">
    <slot name="left"></slot>
    <el-form-item>
      <el-button  type="primary" @click="toSearch">搜索</el-button>
      <el-button @click="reset">重置</el-button>
    </el-form-item>
  </el-form>
  </div>
</template>

<script setup>
import {getCurrentInstance} from 'vue'

const props=defineProps({
  queryParam: {}
})
const emit = defineEmits();
const {proxy} = getCurrentInstance();
   function reset(){
      proxy.$refs['search'].resetFields()
      emit("search")
   }
</script>

<script>

export default {
  methods:{
    toSearch(){
      this.$emit("search")
    }
  }
}
</script>
